package com.yixun.interceptor;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

@Configuration
public class InterceptorAdapter implements WebMvcConfigurer {
    private static final Logger LOGGER = LoggerFactory.getLogger(InterceptorAdapter.class);
    @Resource
    private UrlInterceptor urlInterceptor;
    
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //测试，拦截器关闭中
       // registry.addInterceptor(urlInterceptor).addPathPatterns("/**").excludePathPatterns("/", "/login", "logout", "/error/**", "/static/**");
    }
}
